package com.ktwlrj.core.config;

/**
 * OkHttp 配置
 *
 * @author zhouxuanhong
 * @date 2019-09-27 07:19
 * @since JDK1.8
 */
//@Configuration
//@ConditionalOnClass(Feign.class)
//@AutoConfigureBefore(FeignAutoConfiguration.class)
public class OkHttpConfig {
//    @Bean
//    public okhttp3.OkHttpClient okHttpClient() {
//        return new okhttp3.OkHttpClient.Builder()
//                //设置连接超时
//                .connectTimeout(10, TimeUnit.SECONDS)
//                //设置读超时
//                .readTimeout(10, TimeUnit.SECONDS)
//                //设置写超时
//                .writeTimeout(10, TimeUnit.SECONDS)
//                //是否自动重连
//                .retryOnConnectionFailure(true)
//                .connectionPool(new ConnectionPool(10, 5L, TimeUnit.MINUTES))
//                .build();
//    }
}
